package com.ranjiaqi.function;

import java.util.function.Predicate;

/**
 * @ClassName PredicateTest
 * @Description TODO
 * @Author hp
 * @Date 2021/7/5 16:33
 * @Version 1.0
 **/
public class PredicateTest {
    public static void main(String[] args) {
        String str1 = "HelloWorld";
        boolean b =predicate(s -> s.length()>=5,str1);
        System.out.println("b = " + b);
    }
    public static boolean predicate(Predicate<String> predicate,String str){
        return predicate.test(str);
    }
}
